<template>
    <div id="OrdersTitle">
        <v-details :inputConfig="inputConfig" :detailData="inputData" :rules="rules"></v-details>
    </div>
</template>

<script>
    import details from 'commons/Detail'
    import baseMixin from "@/mixins/BaseMixin";

    export default {
        props: {
            inputData: {
                type: Object,
            }
        },
        mixins: [baseMixin],
        name: "OrdersTitle",
        data() {
            return {
                addflag: true,
                rules: {},
            }
        },
        computed: {
            inputConfig() {
                return [
                    [
                        {
                            type: "input",
                            label: "汇款代码",
                            props: "remit_code",
                            disabled: this.addflag
                        },
                        {
                            type: "input",
                            label: this.$t('security.name'),
                            props: "name",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('config.address',{no:'1'}),
                            props: "adr1",
                        },
                        {
                            type: "input",
                            label: this.$t('config.address',{no:'2'}),
                            props: "adr2",
                        },

                        {
                            type: "input",
                            label: this.$t('config.address',{no:'3'}),
                            props: "adr3",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('config.city'),
                            props: "city",
                        },
                        {
                            type: "input",
                            label: this.$t('config.provice'),
                            props: "state_province",
                        },
                        {
                            type: "input",
                            label: this.$t('config.postcode'),
                            props: "zip",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('config.phone'),
                            props: "phone",
                        },
                        {
                            type: "input",
                            label: this.$t('out.fax'),
                            props: "fax",
                        },
                        {
                            type: "select",
                            label: "国家/地区",
                            props: "country_code",
                            options: this.getOptions("querycodeLkup/ISOCOUNTRY")
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: "联系人1",
                            props: "contact1",
                        },
                        {
                            type: "input",
                            label: "电子邮箱1",
                            props: "email1",
                        },
                        {
                            type: "input",
                            label: "联系人2",
                            props: "contact2",
                        },
                        {
                            type: "input",
                            label: "电子邮箱2",
                            props: "email2",
                        },
                        {
                            type: "input",
                            label: "联系人3",
                            props: "contact3",
                        },
                        {
                            type: "input",
                            label: "电子邮箱3",
                            props: "email3",
                        },

                    ]
                ]
            }
        },
        methods: {},
        mounted() {
            if (this.$store.state.newFlag) {
                this.addflag = false;
            }
        },
        watch: {},
        components: {
            'v-details': details
        }
    }
</script>

<style scoped>

</style>
